<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Han Ran">
    <link type="image/x-icon" rel="shortcut icon" href="${homePath}/images/favicon.ico"/>

    <title>${title}</title>

    <link href="${homePath}/css/style.css" rel="stylesheet">
    <link href="${homePath}/css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="${homePath}/js/html5shiv.js"></script>
    <script src="${homePath}/js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="login-body">

<div class="container">

    <form id="register-form" class="form-signin" action="members" method="post">
        <div class="form-signin-heading text-center">
            <title>${title}</title>
            <img src="${homePath}/images/login-logo.png" alt=""/>
        </div>

        <div class="login-wrap">
            <p>欢迎申请加入SHREEC，请填写以下信息并提交:</p>
            <input type="text" name="company" autofocus="autofocus" placeholder="公司" class="form-control">
            <input type="text" name="name" placeholder="姓名" class="form-control">
            <input type="text" name="title" placeholder="职位" class="form-control">
            <input type="text" name="cellphone" placeholder="手机" class="form-control">
            <input type="text" name="wechat" placeholder="微信号" class="form-control">
            <input type="text" name="email" placeholder="邮箱" class="form-control">
        <#--<label class="checkbox">-->
        <#--<input type="checkbox" name="agree" value="agree_this_condition">-->
        <#--本人承诺以上资料的真实性和完整性。-->
        <#--</label>  -->
            <input type="checkbox" name="agree" value="agree_this_condition" checked>
            本人承诺以上资料的真实性和完整性。
            <button type="submit" class="btn btn-lg btn-login btn-block">
                提交申请
            </button>
        </div>
    </form>
</div>


<!-- Placed js at the end of the document so the pages load faster -->

<!-- Placed js at the end of the document so the pages load faster -->
<script src="${homePath}/js/jquery-1.10.2.min.js"></script>
<script src="${homePath}/js/bootstrap.min.js"></script>
<script src="${homePath}/js/modernizr.min.js"></script>
<script src="${homePath}/js/jquery.validate.min.js"></script>
<script>
    var Script = function () {
        $().ready(function () {

            $.validator.addMethod("isPhone", function (value, element) {
                var length = value.length;
                return this.optional(element) || (length == 11 && /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/.test(value));
            }, "please input your correct cellphone ");

            // validate signup form on keyup and submit
            $("#register-form").validate({
                rules: {
                    company: "required",
                    name: "required",
                    title: "required",
                    cellphone: {
                        isPhone: true,
                        required: true
                    },
                    wechat: {
                        required: true,
                        minlength: 4
                    },
                    email: {
                        required: true,
                        email: true
                    },
                    agree: "required"
                },
                messages: {
//                    company: "请输入公司名称",
//                    name: "请输入您的姓名",
//                    title: "请输入您的职位",
//                    wechat: "请输入微信号",
//                    agree: "请接受真实性承诺"
                }
            });
        });
    }();
</script>
</body>
</html>